<?php
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::group(['middleware' => [], 'prefix' => 'login'], function () {
    Route::any('miniapp_login', 'LoginController@miniappLogin'); //微信小程序授权登录
    Route::any('test', 'IndexController@test'); //微信小程序授权登录
//    Route::any('get', 'LuckController@get'); //微信小程序授权登录
});

//用户模块
Route::group(['middleware' => ['auth.api'], 'prefix' => 'user'], function () {
    Route::post('editUser', 'UserController@editUser'); //修改用户信息
    Route::post('light', 'UserController@light'); //点亮
    Route::get('status', 'UserController@getMyStatus'); //获取我的点亮状态
    Route::post('luck', 'LuckController@get'); //抽奖
    Route::get('detail', 'UserController@detail'); //获取次数
    Route::get('share', 'UserController@share'); //分享
    Route::get('isFree', 'UserController@isFree'); //判断会员情况
    Route::get('incrNum', 'UserController@incrNum'); //每日增加
});

//脚本
Route::group(['middleware' => [], 'prefix' => 'script'], function () {
    Route::get('send', 'ScriptController@send'); //发送卡券
    Route::get('test', 'ScriptController@test'); //测试卡券

});